package moe.hotk

import scala.language.implicitConversions

package object common {

  implicit final class PipeOps[A](private val x: A) extends AnyVal {
    @inline def |>[B](f: A => B): B = f(x)
  }

  implicit final class SideEffectOps[A](private val x: A) extends AnyVal {
    @inline def withSideEffect(f: A => Unit): A = {
      f(x)
      x
    }
  }

}
